package com.beck.code.generator.generatorProcessor;

import lombok.Data;

/**
 * @author CuiJianbo
 * @since 2025/7/1
 */
@Data
public class IntrospectedColumn {

    private String columnName;

    private String jdbcType;

    private String remarks;

    public void setJdbcTypeValue(String jdbcType) {
        String jdbcTypeName = switch (jdbcType) {
            case "int2" -> "smallint";
            case "int4" -> "integer";
            case "int8" -> "bigint";
            case "bool" -> "boolean";
            default -> jdbcType;
        };
        this.jdbcType = jdbcTypeName.toUpperCase();
    }
}
